|
|
|
|
|
|
|
Figure 19.6 shows the entries in the My Computer\HKEY_CURRENT_USER\Software\ODBC\ODBC.INI section of the Registry file that were created when you added the ODBC API Test data source. Your entries might vary slightly. |
|
|
|
|
|
|
|
|
Figure 19.6.
Viewing the Registry entries for the new data source. |
|
|
|
|
|
|
|
|
You can register as many data sources as you want. You can add various options to the data-source definition, depending on the target data file with which you are working. With Microsoft Jet databases, for example, you can add the SYSTEM security file to the data source to force users to provide valid user IDs and passwords. You also can adjust time-out values and mark the data source for exclusive use only. Other possible entries for other data file formats exist as well. |
|
|
|
|
| |
|
|
|
|
Review the ODBC Administrator online help file for more information on configuring ODBC data sources. |
|
|
|
|
|
|
|
|
|
|
Creating the ODBC API Library Routines |
|
|
|
|
|
|
|
|
Now that you know how to define ODBC data sources, you are ready to put together a Visual Basic 5 program that uses the ODBC interface to read and write data. To build your ODBC application, you need to declare several Windows API calls. These calls, along with a handful of predefined constants, are the heart of creating an ODBC-capable database program. This chapter doesn't review all the ODBC API callsonly the essential ones you need to get your ODBC application working. |
|
|
|
|
|